﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Master.Master" Inherits="System.Web.Mvc.ViewPage<OnlineMovieTicket.Model.Movies>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"></asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<link type="text/css" href="<%= Url.Content("~/Content/themes/base/jquery.ui.all.css") %>" rel="stylesheet" /> 
<script type="text/javascript" src="<%= Url.Content("~/Scripts/jquery-1.4.2.js") %>" ></script>  
<script type="text/javascript" src="<%= Url.Content("~/Scripts/ui/jquery.ui.core.js") %>"></script> 
<script type="text/javascript" src="<%= Url.Content("~/Scripts/ui/jquery.ui.widget.js") %>"></script> 
<script type="text/javascript" src="<%= Url.Content("~/Scripts/ui/jquery.ui.datepicker.js") %>"></script>   
<script src="/Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="/Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
<script src="/Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>
<script type="text/javascript" >
     $(function () {
         var date=$("#ReleaseDate").datepicker({ dateFormat: 'dd-MM-yy' });
     });
</script>
         <table cellpadding="0" cellspacing="0"  class="pageBackGround">
                            <tr> <td colspan="6"><% Html.EnableClientValidation(); %>
                                    <% using (Html.BeginForm("Create", "Movies", FormMethod.Post, new { enctype = "multipart/form-data" }))
                                       {%>
                                        <%: Html.ValidationSummary(true)%></td></tr>
                                                            <tr><td class="fontWhite">
                                                                <table bgcolor="white" >                 
                                                                    <tr><td>                
                                                                        <table cellpadding="6" cellspacing="6" height="100%" class="pageBackGround" width="975px">
                                                                            <tr><td class="fontWhiteBold" colspan="6"><h2>Movies - Create Movie</h2></td></tr>
                                                                            <tr><td width="10%"><%: Html.LabelFor(model => model.MovieCode)%></td>
                                                                                <td width="1px">:</td>
                                                                                <td><%: Html.TextBoxFor(model => model.MovieCode, new Dictionary<string, object>() { { "readonly", "true" }, { "class", "text-box-readonly" } })%></td>                                                   
                                                                                <td><%: Html.ValidationMessageFor(model => model.MovieCode)%></td> 
                                                                                <td width="10%"> <%: Html.LabelFor(model => model.MovieName)%></td>
                                                                                <td width="1px">:</td>
                                                                                <td> <%: Html.TextBoxFor(model => model.MovieName)%></td>
                                                                                <td> <%: Html.ValidationMessageFor(model => model.MovieName)%></td>
                                                                            </tr>  
                                                                            <tr><td><%: Html.LabelFor(model => model.Language)%></td>
                                                                                <td width="1px">:</td>
                                                                                <td><%: Html.TextBoxFor(model => model.Language)%></td>
                                                                                <td><%: Html.ValidationMessageFor(model => model.Language)%></td>
                                                                                <td><%: Html.LabelFor(model => model.Duration)%></td>
                                                                                <td width="1px">:</td>
                                                                                <td><%: Html.TextBoxFor(model => model.Duration)%></td>
                                                                                <td><%: Html.ValidationMessageFor(model => model.Duration)%></td>
                                                                            </tr> 
                                                                            <tr>
                                                                            <td> <%: Html.LabelFor(model => model.ReleaseDate)%></td>
                                                                                <td width="1px">:</td>
                                                                                <td><%: Html.TextBox("ReleaseDate",DateTime.Today.Date.ToString("dd-MMM-yyyy")) %></td>
                                                                                <td> <%: Html.ValidationMessageFor(model => model.ReleaseDate)%></td>
                                                                                <td> <%: Html.LabelFor(model => model.Genre)%></td>
                                                                                <td width="1px">:</td>
                                                                                <td><%: Html.DropDownListFor(model => model.Genre, new SelectList(new string[]{"Action", "Comedy", "Horror", "Thriller", "Drama"}))%></td>
                                                                                <td><%: Html.ValidationMessageFor(model => model.Genre)%></td>
                                                                            </tr> 
                                                                            <tr><td><%: Html.LabelFor(model => model.Subtitle)%></td>
                                                                                <td width="1px">:</td>
                                                                                <td> <%: Html.TextBoxFor(model => model.Subtitle)%></td>
                                                                                <td> <%: Html.ValidationMessageFor(model => model.Subtitle)%></td>
                                                                                <td> <%: Html.LabelFor(model => model.Synopsis)%></td>
                                                                                <td width="1px">:</td>
                                                                                <td><%: Html.TextAreaFor(model => model.Synopsis, new Dictionary<string, object>() { { "class", "text-area.multi-line" } })%></td>
                                                                                <td> <%: Html.ValidationMessageFor(model => model.Synopsis)%></td>
                                                                            </tr>    
                                                                            <tr><td><%: Html.LabelFor(model => model.Trailer)%></td>
                                                                                <td width="1px">:</td>
                                                                                <td><%: Html.TextBoxFor(model => model.Trailer)%></td>
                                                                                <td><%: Html.ValidationMessageFor(model => model.Trailer)%></td>
                                                                                <td><%: Html.LabelFor(model => model.Website)%></td>
                                                                                <td width="1px">:</td>
                                                                                <td> <%: Html.TextBoxFor(model => model.Website)%></td>
                                                                                <td><%: Html.ValidationMessageFor(model => model.Website)%></td>
                                                                            </tr>   
                                                                            <tr><td> <%: Html.LabelFor(model => model.MovieCast)%></td>
                                                                                <td width="1px">:</td>
                                                                                <td><%: Html.TextBoxFor(model => model.MovieCast)%></td>
                                                                                <td> <%: Html.ValidationMessageFor(model => model.MovieCast)%></td>
                                                                                <td> <%: Html.LabelFor(model => model.MovieDirector)%></td>
                                                                                <td width="1px">:</td>
                                                                                <td> <%: Html.TextBoxFor(model => model.MovieDirector)%></td>
                                                                                <%--<td><%: Html.ValidationMessageFor(model => model.MovieDirector)%></td>--%>
                                                                            </tr> 
                                                                            <tr><td> <%: Html.LabelFor(model => model.Distributor)%></td>
                                                                                <td width="1px">:</td>
                                                                                <td><%: Html.TextBoxFor(model => model.Distributor)%></td>
                                                                                <%--<td> <%: Html.ValidationMessageFor(model => model.Distributor)%></td>--%>
                                                                                <td></td>
                                                                                <td><%: Html.LabelFor(model => model.Status)%></td>
                                                                                <td width="1px">:</td>
                                                                                <td> <%: Html.DropDownListFor(model => model.Status, (SelectList)ViewData["MovieStatus"])%></td>
                                                                                <td> <%: Html.ValidationMessageFor(model => model.Status)%></td>
                                                                            </tr> 
                                                                            <tr><td> <%: Html.LabelFor(model => model.Image)%></td>
                                                                                <td width="1px">:</td>
                                                                                <td><input type="file" id="myFile" name="myFile" runat="server" />                                                                               
                                                                                <%: Html.ValidationMessageFor(model => model.Image)%>
                                                                                </td>
                                                                                <td> </td>
                                                                            </tr> 
                                                                            <tr><td colspan="8" align="center"><input type="submit" value="Create" class="btn" /></td></tr>                           
                                                                            </td></tr>
                                                                            <tr><td height="10"> <%: Html.ActionLink("Back to List", "Index")%></td></tr>        
                                                                            </table>    
                                                                        </td></tr>        
                                                                                                            
                                                 <% } %>                                      
                                                              </table>
                                                        </td></tr>
                                        <tr><td height="10"></td></tr>                                    
                                </table>
</asp:Content>

